﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Template.Master" AutoEventWireup="true" CodeBehind="GioHang.aspx.cs" Inherits="OnlineDigitalCameraWebsite.GioHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="container11">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">Giỏ Hàng</h3>
        </div>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
            <HeaderTemplate>
                <div style="text-align: center; margin-top: 20px; font-size: 18px;"><a href="/GioHang.aspx?EmptyCart=true">Xóa Giỏ Hàng</a></div>
            </HeaderTemplate>
            <ItemTemplate>

                <div class="panel-body">
                    <div class="media giohang" id="danhsachgiohang">
                        <div class="media" id="backdrop-giohang">
                            <div style="float: left;">
                                <a target="_blank" class="pull-left" href='ChiTiet.aspx?cate=camera&id=<%# DataBinder.Eval(Container.DataItem, "ProductId") %>'>
                                    <asp:Label ID="lblProductId" runat="server" Visible="False" Text='<%# DataBinder.Eval(Container.DataItem, "ProductId") %>' />
                                    <asp:Image ID="Image1" runat="server" CssClass="media-object" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Image") %>' Width="128px" Height="128px" />
                                </a>
                            </div>
                            <div class="media-body giohang" style="padding-left: 180px;">
                                <%--<a target="_blank" href='/ChiTiet.aspx?cate=camera&id=<%# DataBinder.Eval(Container.DataItem, "ProductId") %>'>
                                    <h4 class="media-heading"><%# DataBinder.Eval(Container.DataItem, "ProductName") %></h4>
                                </a>--%>
                                <h4 class="media-heading"><%# DataBinder.Eval(Container.DataItem, "ProductName") %></h4>

                                <!-- Giá: <b><%# string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("vi-VN"), "{0:#,## VNĐ}",DataBinder.Eval(Container.DataItem, "Price")) %>
                                   </b>  <br /> -->
                                Số Lượng: 
                                    <asp:TextBox ID="txtQty" runat="server" Width="32px" AutoPostBack="True" Text='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>' OnTextChanged="txtQty_TextChanged"></asp:TextBox><br />
                                Thành Tiền: <b style="font-size: medium;"><%# string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("vi-VN"), "{0:#,## VNĐ}",DataBinder.Eval(Container.DataItem, "Price")) %></b>
                                <br />
                                <div style="font-size: medium;"><a href='/GioHang.aspx?Remove=<%# DataBinder.Eval(Container.DataItem, "ProductId") %>'>Xóa </a></div>

                            </div>
                        </div>
                    </div>
                </div>
            </ItemTemplate>
            <FooterTemplate>
                <div class="panel-body">
                    <div class="pull-right" style="text-align: right">
                        Tổng Cộng:  
                    <b style="font-size: large;"><%=string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("vi-VN"), "{0:#,## VNĐ}", SelectedInvoice.Total)%></b>
                        <br />
                        <a href="/Default.aspx">Tiếp tục mua hàng?</a>&nbsp;&nbsp;
                    <asp:LinkButton ID="btnDatHang" runat="server"  href="/ThanhToan.aspx" OnClick="btnDatHang_Click" Class="btn btn-primary nutmonan"><span runat="server" class="glyphicon glyphicon-arrow-right"></span> Thanh Toán</asp:LinkButton>

                    </div>
                </div>

            </FooterTemplate>
        </asp:Repeater>
        <h4 style="padding-left:30px">
            <asp:Label ID="lblEmptyCartMessage" runat="server" Text="Không có sản phẩm nào trong giỏ hàng!" Visible="False"></asp:Label></h4>

    </div>

</div>
</asp:Content>
